3.38 \(\int \frac{3+4 x}{\sqrt{-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\)

Optimal. Leaf size=86 \[ \sqrt{2} \tan ^{-1}\left (\frac{1-\frac{x+3}{\sqrt{-x^2-4 x-3}}}{\sqrt{2}}\right )-\sqrt{2} \tan ^{-1}\left (\frac{\frac{x+3}{\sqrt{-x^2-4 x-3}}+1}{\sqrt{2}}\right )+\tanh ^{-1}\left (\frac{x}{\sqrt{-x^2-4 x-3}}\right ) \]

[Out]

Sqrt[2]*ArcTan[(1 - (3 + x)/Sqrt[-3 - 4*x - x^2])/Sqrt[2]] - Sqrt[2]*ArcTan[(1 +
 (3 + x)/Sqrt[-3 - 4*x - x^2])/Sqrt[2]] + ArcTanh[x/Sqrt[-3 - 4*x - x^2]]

_______________________________________________________________________________________

Rubi [A]  time = 0.437591, antiderivative size = 86, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 9, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.281 \[ \sqrt{2} \tan ^{-1}\left (\frac{1-\frac{x+3}{\sqrt{-x^2-4 x-3}}}{\sqrt{2}}\right )-\sqrt{2} \tan ^{-1}\left (\frac{\frac{x+3}{\sqrt{-x^2-4 x-3}}+1}{\sqrt{2}}\right )+\tanh ^{-1}\left (\frac{x}{\sqrt{-x^2-4 x-3}}\right ) \]

Antiderivative was successfully verified.

[In]  Int[(3 + 4*x)/(Sqrt[-3 - 4*x - x^2]*(3 + 4*x + 2*x^2)),x]

[Out]

Sqrt[2]*ArcTan[(1 - (3 + x)/Sqrt[-3 - 4*x - x^2])/Sqrt[2]] - Sqrt[2]*ArcTan[(1 +
 (3 + x)/Sqrt[-3 - 4*x - x^2])/Sqrt[2]] + ArcTanh[x/Sqrt[-3 - 4*x - x^2]]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 61.2249, size = 83, normalized size = 0.97 \[ - \sqrt{2} \operatorname{atan}{\left (\sqrt{2} \left (\frac{3 \left (\frac{x}{3} + 1\right )}{2 \sqrt{- x^{2} - 4 x - 3}} - \frac{1}{2}\right ) \right )} - \sqrt{2} \operatorname{atan}{\left (\sqrt{2} \left (\frac{3 \left (\frac{x}{3} + 1\right )}{2 \sqrt{- x^{2} - 4 x - 3}} + \frac{1}{2}\right ) \right )} + \operatorname{atanh}{\left (\frac{x}{\sqrt{- x^{2} - 4 x - 3}} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((3+4*x)/(2*x**2+4*x+3)/(-x**2-4*x-3)**(1/2),x)

[Out]

-sqrt(2)*atan(sqrt(2)*(3*(x/3 + 1)/(2*sqrt(-x**2 - 4*x - 3)) - 1/2)) - sqrt(2)*a
tan(sqrt(2)*(3*(x/3 + 1)/(2*sqrt(-x**2 - 4*x - 3)) + 1/2)) + atanh(x/sqrt(-x**2
- 4*x - 3))

_______________________________________________________________________________________

Mathematica [C]  time = 6.27008, size = 1079, normalized size = 12.55 \[ -\frac{i \left (i+2 \sqrt{2}\right ) \tan ^{-1}\left (\frac{6 i \sqrt{2} x^4-16 x^4+18 i \sqrt{1-2 i \sqrt{2}} \sqrt{-x^2-4 x-3} x^3+68 i \sqrt{2} x^3-68 x^3+72 i \sqrt{1-2 i \sqrt{2}} \sqrt{-x^2-4 x-3} x^2+185 i \sqrt{2} x^2-44 x^2+99 i \sqrt{1-2 i \sqrt{2}} \sqrt{-x^2-4 x-3} x+176 i \sqrt{2} x+68 x+54 i \sqrt{1-2 i \sqrt{2}} \sqrt{-x^2-4 x-3}+51 i \sqrt{2}+60}{32 \sqrt{2} x^4+66 i x^4+208 \sqrt{2} x^3+304 i x^3+466 \sqrt{2} x^2+493 i x^2+440 \sqrt{2} x+340 i x+150 \sqrt{2}+93 i}\right )}{2 \sqrt{1-2 i \sqrt{2}}}-\frac{i \left (-i+2 \sqrt{2}\right ) \tan ^{-1}\left (\frac{6 i \sqrt{2} x^4+16 x^4+18 i \sqrt{1+2 i \sqrt{2}} \sqrt{-x^2-4 x-3} x^3+68 i \sqrt{2} x^3+68 x^3+72 i \sqrt{1+2 i \sqrt{2}} \sqrt{-x^2-4 x-3} x^2+185 i \sqrt{2} x^2+44 x^2+99 i \sqrt{1+2 i \sqrt{2}} \sqrt{-x^2-4 x-3} x+176 i \sqrt{2} x-68 x+54 i \sqrt{1+2 i \sqrt{2}} \sqrt{-x^2-4 x-3}+51 i \sqrt{2}-60}{32 \sqrt{2} x^4-66 i x^4+208 \sqrt{2} x^3-304 i x^3+466 \sqrt{2} x^2-493 i x^2+440 \sqrt{2} x-340 i x+150 \sqrt{2}-93 i}\right )}{2 \sqrt{1+2 i \sqrt{2}}}+\frac{\left (i+2 \sqrt{2}\right ) \log \left (\left (-2 i x+\sqrt{2}-2 i\right )^2 \left (2 i x+\sqrt{2}+2 i\right )^2\right )}{4 \sqrt{1-2 i \sqrt{2}}}+\frac{\left (-i+2 \sqrt{2}\right ) \log \left (\left (-2 i x+\sqrt{2}-2 i\right )^2 \left (2 i x+\sqrt{2}+2 i\right )^2\right )}{4 \sqrt{1+2 i \sqrt{2}}}-\frac{\left (i+2 \sqrt{2}\right ) \log \left (\left (2 x^2+4 x+3\right ) \left (2 i \sqrt{2} x^2+2 x^2-2 \sqrt{2 \left (1-2 i \sqrt{2}\right )} \sqrt{-x^2-4 x-3} x+8 i \sqrt{2} x+4 x-2 \sqrt{2 \left (1-2 i \sqrt{2}\right )} \sqrt{-x^2-4 x-3}+6 i \sqrt{2}+3\right )\right )}{4 \sqrt{1-2 i \sqrt{2}}}-\frac{\left (-i+2 \sqrt{2}\right ) \log \left (\left (2 x^2+4 x+3\right ) \left (-2 i \sqrt{2} x^2+2 x^2-2 \sqrt{2 \left (1+2 i \sqrt{2}\right )} \sqrt{-x^2-4 x-3} x-8 i \sqrt{2} x+4 x-2 \sqrt{2 \left (1+2 i \sqrt{2}\right )} \sqrt{-x^2-4 x-3}-6 i \sqrt{2}+3\right )\right )}{4 \sqrt{1+2 i \sqrt{2}}} \]

Antiderivative was successfully verified.

[In]  Integrate[(3 + 4*x)/(Sqrt[-3 - 4*x - x^2]*(3 + 4*x + 2*x^2)),x]

[Out]

((-I/2)*(I + 2*Sqrt[2])*ArcTan[(60 + (51*I)*Sqrt[2] + 68*x + (176*I)*Sqrt[2]*x -
 44*x^2 + (185*I)*Sqrt[2]*x^2 - 68*x^3 + (68*I)*Sqrt[2]*x^3 - 16*x^4 + (6*I)*Sqr
t[2]*x^4 + (54*I)*Sqrt[1 - (2*I)*Sqrt[2]]*Sqrt[-3 - 4*x - x^2] + (99*I)*Sqrt[1 -
 (2*I)*Sqrt[2]]*x*Sqrt[-3 - 4*x - x^2] + (72*I)*Sqrt[1 - (2*I)*Sqrt[2]]*x^2*Sqrt
[-3 - 4*x - x^2] + (18*I)*Sqrt[1 - (2*I)*Sqrt[2]]*x^3*Sqrt[-3 - 4*x - x^2])/(93*
I + 150*Sqrt[2] + (340*I)*x + 440*Sqrt[2]*x + (493*I)*x^2 + 466*Sqrt[2]*x^2 + (3
04*I)*x^3 + 208*Sqrt[2]*x^3 + (66*I)*x^4 + 32*Sqrt[2]*x^4)])/Sqrt[1 - (2*I)*Sqrt
[2]] - ((I/2)*(-I + 2*Sqrt[2])*ArcTan[(-60 + (51*I)*Sqrt[2] - 68*x + (176*I)*Sqr
t[2]*x + 44*x^2 + (185*I)*Sqrt[2]*x^2 + 68*x^3 + (68*I)*Sqrt[2]*x^3 + 16*x^4 + (
6*I)*Sqrt[2]*x^4 + (54*I)*Sqrt[1 + (2*I)*Sqrt[2]]*Sqrt[-3 - 4*x - x^2] + (99*I)*
Sqrt[1 + (2*I)*Sqrt[2]]*x*Sqrt[-3 - 4*x - x^2] + (72*I)*Sqrt[1 + (2*I)*Sqrt[2]]*
x^2*Sqrt[-3 - 4*x - x^2] + (18*I)*Sqrt[1 + (2*I)*Sqrt[2]]*x^3*Sqrt[-3 - 4*x - x^
2])/(-93*I + 150*Sqrt[2] - (340*I)*x + 440*Sqrt[2]*x - (493*I)*x^2 + 466*Sqrt[2]
*x^2 - (304*I)*x^3 + 208*Sqrt[2]*x^3 - (66*I)*x^4 + 32*Sqrt[2]*x^4)])/Sqrt[1 + (
2*I)*Sqrt[2]] + ((-I + 2*Sqrt[2])*Log[(-2*I + Sqrt[2] - (2*I)*x)^2*(2*I + Sqrt[2
] + (2*I)*x)^2])/(4*Sqrt[1 + (2*I)*Sqrt[2]]) + ((I + 2*Sqrt[2])*Log[(-2*I + Sqrt
[2] - (2*I)*x)^2*(2*I + Sqrt[2] + (2*I)*x)^2])/(4*Sqrt[1 - (2*I)*Sqrt[2]]) - ((I
 + 2*Sqrt[2])*Log[(3 + 4*x + 2*x^2)*(3 + (6*I)*Sqrt[2] + 4*x + (8*I)*Sqrt[2]*x +
 2*x^2 + (2*I)*Sqrt[2]*x^2 - 2*Sqrt[2*(1 - (2*I)*Sqrt[2])]*Sqrt[-3 - 4*x - x^2]
- 2*Sqrt[2*(1 - (2*I)*Sqrt[2])]*x*Sqrt[-3 - 4*x - x^2])])/(4*Sqrt[1 - (2*I)*Sqrt
[2]]) - ((-I + 2*Sqrt[2])*Log[(3 + 4*x + 2*x^2)*(3 - (6*I)*Sqrt[2] + 4*x - (8*I)
*Sqrt[2]*x + 2*x^2 - (2*I)*Sqrt[2]*x^2 - 2*Sqrt[2*(1 + (2*I)*Sqrt[2])]*Sqrt[-3 -
 4*x - x^2] - 2*Sqrt[2*(1 + (2*I)*Sqrt[2])]*x*Sqrt[-3 - 4*x - x^2])])/(4*Sqrt[1
+ (2*I)*Sqrt[2]])

_______________________________________________________________________________________

Maple [A]  time = 0.011, size = 123, normalized size = 1.4 \[{\frac{\sqrt{3}\sqrt{4}}{6}\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12} \left ( \sqrt{2}\arctan \left ({\frac{\sqrt{2}}{6}\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12}} \right ) -{\it Artanh} \left ( 3\,{\frac{x}{-3/2-x}{\frac{1}{\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12}}}} \right ) \right ){\frac{1}{\sqrt{{1 \left ({{x}^{2} \left ( -{\frac{3}{2}}-x \right ) ^{-2}}-4 \right ) \left ( 1+{x \left ( -{\frac{3}{2}}-x \right ) ^{-1}} \right ) ^{-2}}}}} \left ( 1+{x \left ( -{\frac{3}{2}}-x \right ) ^{-1}} \right ) ^{-1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((3+4*x)/(2*x^2+4*x+3)/(-x^2-4*x-3)^(1/2),x)

[Out]

1/6*3^(1/2)*4^(1/2)*(3*x^2/(-3/2-x)^2-12)^(1/2)*(2^(1/2)*arctan(1/6*(3*x^2/(-3/2
-x)^2-12)^(1/2)*2^(1/2))-arctanh(3*x/(-3/2-x)/(3*x^2/(-3/2-x)^2-12)^(1/2)))/((x^
2/(-3/2-x)^2-4)/(1+x/(-3/2-x))^2)^(1/2)/(1+x/(-3/2-x))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{4 \, x + 3}{{\left (2 \, x^{2} + 4 \, x + 3\right )} \sqrt{-x^{2} - 4 \, x - 3}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((4*x + 3)/((2*x^2 + 4*x + 3)*sqrt(-x^2 - 4*x - 3)),x, algorithm="maxima")

[Out]

integrate((4*x + 3)/((2*x^2 + 4*x + 3)*sqrt(-x^2 - 4*x - 3)), x)

_______________________________________________________________________________________

Fricas [A]  time = 0.29282, size = 167, normalized size = 1.94 \[ \frac{1}{2} \, \sqrt{2} \arctan \left (\frac{\sqrt{2}{\left (x + 3 \, \sqrt{-x^{2} - 4 \, x - 3}\right )}}{2 \,{\left (2 \, x + 3\right )}}\right ) + \frac{1}{2} \, \sqrt{2} \arctan \left (-\frac{\sqrt{2}{\left (x - 3 \, \sqrt{-x^{2} - 4 \, x - 3}\right )}}{2 \,{\left (2 \, x + 3\right )}}\right ) - \frac{1}{4} \, \log \left (-\frac{2 \, \sqrt{-x^{2} - 4 \, x - 3} x + 4 \, x + 3}{x^{2}}\right ) + \frac{1}{4} \, \log \left (\frac{2 \, \sqrt{-x^{2} - 4 \, x - 3} x - 4 \, x - 3}{x^{2}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((4*x + 3)/((2*x^2 + 4*x + 3)*sqrt(-x^2 - 4*x - 3)),x, algorithm="fricas")

[Out]

1/2*sqrt(2)*arctan(1/2*sqrt(2)*(x + 3*sqrt(-x^2 - 4*x - 3))/(2*x + 3)) + 1/2*sqr
t(2)*arctan(-1/2*sqrt(2)*(x - 3*sqrt(-x^2 - 4*x - 3))/(2*x + 3)) - 1/4*log(-(2*s
qrt(-x^2 - 4*x - 3)*x + 4*x + 3)/x^2) + 1/4*log((2*sqrt(-x^2 - 4*x - 3)*x - 4*x
- 3)/x^2)

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{4 x + 3}{\sqrt{- \left (x + 1\right ) \left (x + 3\right )} \left (2 x^{2} + 4 x + 3\right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((3+4*x)/(2*x**2+4*x+3)/(-x**2-4*x-3)**(1/2),x)

[Out]

Integral((4*x + 3)/(sqrt(-(x + 1)*(x + 3))*(2*x**2 + 4*x + 3)), x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.273383, size = 220, normalized size = 2.56 \[ \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (\frac{3 \,{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + 1\right )}\right ) + \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (\frac{\sqrt{-x^{2} - 4 \, x - 3} - 1}{x + 2} + 1\right )}\right ) + \frac{1}{2} \,{\rm ln}\left (\frac{2 \,{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac{3 \,{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 1\right ) - \frac{1}{2} \,{\rm ln}\left (\frac{2 \,{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac{{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((4*x + 3)/((2*x^2 + 4*x + 3)*sqrt(-x^2 - 4*x - 3)),x, algorithm="giac")

[Out]

sqrt(2)*arctan(1/2*sqrt(2)*(3*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 1)) + sqrt(2)
*arctan(1/2*sqrt(2)*((sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 1)) + 1/2*ln(2*(sqrt(-
x^2 - 4*x - 3) - 1)/(x + 2) + 3*(sqrt(-x^2 - 4*x - 3) - 1)^2/(x + 2)^2 + 1) - 1/
2*ln(2*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + (sqrt(-x^2 - 4*x - 3) - 1)^2/(x + 2)
^2 + 3)